package com.diandian.backend.store.dto;

import com.diandian.base.boot.starter.exception.DefaultException;

import java.io.Serializable;

public class JingdongHomeStoreNodeUpdateParamDTO implements Serializable {

	private String code; // 必传
	private String sourceNodeCode; // 必传
	private String targetNodeCode; // 必传
	private String belong; // 必传
	private String orgId;
	private String orgCode;

	private String updateUserId;
	private String updateUserName;

	public void check(){
		if(this.code == null || "".equals(this.code)){
			throw new DefaultException("门店编码不能为空");
		}
		if(this.sourceNodeCode == null || "".equals(this.sourceNodeCode)){
			throw new DefaultException("原节点编码不能为空");
		}
		if(this.targetNodeCode == null || "".equals(this.targetNodeCode)){
			throw new DefaultException("目标节点编码不能为空");
		}
		if(this.sourceNodeCode.equals(this.targetNodeCode)){
			throw new DefaultException("目标节点不能与原节点相同");
		}
		if(this.belong == null || "".equals(this.belong)){
			throw new DefaultException("归属不能为空");
		}
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getSourceNodeCode() {
		return sourceNodeCode;
	}

	public void setSourceNodeCode(String sourceNodeCode) {
		this.sourceNodeCode = sourceNodeCode;
	}

	public String getTargetNodeCode() {
		return targetNodeCode;
	}

	public void setTargetNodeCode(String targetNodeCode) {
		this.targetNodeCode = targetNodeCode;
	}

	public String getBelong() {
		return belong;
	}

	public void setBelong(String belong) {
		this.belong = belong;
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getUpdateUserId() {
		return updateUserId;
	}

	public void setUpdateUserId(String updateUserId) {
		this.updateUserId = updateUserId;
	}

	public String getUpdateUserName() {
		return updateUserName;
	}

	public void setUpdateUserName(String updateUserName) {
		this.updateUserName = updateUserName;
	}
}
